|
|
Awesome I'm glad I'm not the only one who'd wanted this trick for ages!
Basically what I'm doing is trilinear blending between the same cells
pattern, offset by 1 square in each direction. Since the blend region is no
bigger than 1 square (actually I mean one cube, i.e. one cell) we just need
to overlay 8 copies of the cell pattern offset by <0,0,0> <0,0,1>, <0,1,1>,
etc... so we have all 8 possible values available for tri-linear blending...
Hopefully that explanation might help... though possibly not.
--
Tek
http://evilsuperbrain.com
"Zeger Knaepen" <zeg### [at] MOVEpovplacecom> wrote in message
news:45deb1c0@news.povray.org...
> "Tek" <tek### [at] evilsuperbraincom> wrote in message
> news:45de8021@news.povray.org...
>> I've wanted to do this for ages but I could never figure out how. Then
>> this
>> morning I woke up at 5am with a brain wave! So here it is, povray's cells
>> pattern with linear blending to create blurry cells!
>>
>> Very useful if you want to use cells to choose between random patterns,
>> but
>> you don't want to get hard edges between them.
>>
>> Source in p.b.s-f
>
> thanks!! I've been looking for a way of doing this for ages now!
> still trying to figure out how exactly it works, but maybe when I'm fully
> awake
> it'll hit me :)
>
> cu!
> --
> #macro G(b,e)b+(e-b)*C/50#end#macro _(b,e,k,l)#local C=0;#while(C<50)
> sphere{G(b,e)+3*z.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1;
> #end#end _(y-x,y,x,x+y)_(y,-x-y,x+y,y)_(-x-y,-y,y,y+z)_(-y,y,y+z,x+y)
> _(0x+y.5+y/2x)_(0x-y.5+y/2x) // ZK http://www.povplace.com
>
Post a reply to this message
|
|